# -*- coding: utf-8 -*-
# @Time     : 2021/4/23 16:55
# @Author   : pengrenjie
# @Email    : 941257162@.com
# @File     : lianxi.py
import re
def func1(userlist):

        if re.search(r"^[^0-9]\w{5,17}",userlist):
           return (f"{userlist}符合规范")
        else:
            return (f"{userlist}不符合规范")
userlist = ['123','asdasdasdasd','sdas11_s']
# while 1:
#     username = input("请输入用户名：")
#     userlist.append(username)

print(list(map(func1,userlist)))
# print(userlist)


print(list(filter(lambda x: re.search(r"^[^0-9]\w{5,17}",x),userlist)))

from functools import reduce
n = int(input("输入的数字："))
print(reduce(lambda x, y: x * y, range(1, n+1)))

print(list(filter(lambda x:x%3==0,range(1,101))))
list1 = [1,2,3,4,5,6,7,8,9,10]
print(list(map(lambda x:x*x,list1)))

list2 = [1,4,5,9]

print(reduce(lambda x,y:str(x)+str(y),list2))
print(type(reduce(lambda x,y:str(x)+str(y),list2)))

